<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<base href="<%=basePath%>">
<c:if test="${message }">
         <div style='height:70px;background-color: #eee;'>
           <table class='table' style='width:100%;'>
          <tr>
             <td align="center">
               <strong style='color: #990000;font-size: 14px;'> 
                <b> 管理员：${user.realName }</b>  	,  上传文件成功，你可以继续<a href='<%=basePath%>backend/uploadui'>上传</a>！</strong>
             </td>
          </tr> 
         </table>
         </div>
   </c:if>
<div class="row-fluid" id='newsRe'>
   <c:if test="${delFile==true }">
   <div class="ts" style='height:40px;padding:1px;width:90%;'>
	  <div style='margin-top:15px;'><p align="center" style='color:'>删除成功</p></div>
	</div>
</c:if>
<c:if test="${delFile==false }">
   <div class="ts" style='height:40px;padding:1px;width:90%;'>
	  <div style='margin-top:15px;'><p align="center" style='color:'>删除失败</p></div>
	</div>
</c:if>
<div class='span5'>
		<form action="<%=basePath%>backend/searchdata/1" method="post">
			<input type="text"  value="检索信息" id='search'
				class="init search1" name='datatitle' style=' margin-top: 10px;'>
			
			 <input
				class='btn' type="submit" id='searchbtn' value="找找看"
				>
		</form>
	</div>
<c:if test="${not empty allnews }">

      <div class='' id='news' style='padding:0px;'>
         <div class='right border1'>
            <table class="table table-hoverz article-table" style="width: 100%;margin-top:10px;">
            <tbody>
            <tr>
							<td style='' class=''>标题</td>
							<td class=''>类型</td>
							<td class=''>上传时间</td>
							<td class=''>操作</td>
						</tr>
						<c:forEach items="${allnews }" var="news">
			
			<tr>
			<td ><img src="<%=basePath %>images/li1.gif" style='margin-right:5px;'/><a class='downloadA' href="<c:url  value='/backend/download' />" filename='${news.dataPath }' title='${news.dataName }'><p class='newsTitle1'>${news.dataName }</p></a></td>
			<td align="center" >${news.ddtyId.ddtypeName }</td>
			<td align="center" style='color:#990000;font-weight: bold;'>[${news.dataUploadTime }]</td>
			<td align="right"><i class=' icon-trash' ></i><button url='delFile' backurl='ZiliaoManeger/1' class='del btn btn-info' te='${news.dataId}'  >删除</button></td>
			</tr>
			
			</c:forEach>
			
			</tbody>
			</table>
			<c:if test="${!searchResult }">
			
			   <div id="" class="span12" style='margin-left:40%;margin-top:10px;'>
		   
	   <p> <a href='<%=basePath%>backend/ZiliaoManeger/1 '>首页</a>
	   <a href='<%=basePath%>backend/ZiliaoManeger/${pageNow-1 } ' id="first">[上一页]</a>
	   <a  class="pagenow">
	   <strong style='color:red;font-size:16px;'>${pageNow}</strong></a>...
	   <a href='<%=basePath%>backend/ZiliaoManeger/${pageCount }'>${pageCount }</a>
	   <a href='<%=basePath%>backend/ZiliaoManeger/${pageNow+1 } ' id="next">[下一页]</a>
	   <a href='<%=basePath%>backend/ZiliaoManeger/${pageCount } '>末页</a>
	   </p>
	</div>
         
         
	<script type="text/javascript">
	   $(function(){
		   var page = ${pageNow};
		   var pageCount = ${pageCount};
		   if(parseFloat(page)+1 >parseFloat(pageCount))
			   {
			       $("#next").hide();
			   }
		   if(parseFloat(page)-1 <1)
			   {
			     $("#first").hide();
			   }else{
				   $("#first").show();
			   };
			   
			  
	   });
	</script>
			</c:if>
		<c:if test="${searchResult }">
			   <div id="" class="span12" style='margin-left:40%;margin-top:10px;'>
		   
	   <p> <a href='<%=basePath%>backend/searchdata/1 '>首页</a>
	   <a href='<%=basePath%>backend/searchdata/${pageNow-1 } ' id="first">[上一页]</a>
	   <a  class="pagenow">
	   <strong style='color:red;font-size:16px;'>${pageNow}</strong></a>...
	   <a href='<%=basePath%>backend/searchdata/${pageCount }'>${pageCount }</a>
	   <a href='<%=basePath%>backend/searchdata/${pageNow+1 } ' id="next">[下一页]</a>
	   <a href='<%=basePath%>backend/searchdata/${pageCount } '>末页</a>
	   </p>
	</div>
         
         
	<script type="text/javascript">
	   $(function(){
		   var page = ${pageNow};
		   var pageCount = ${pageCount};
		   if(parseFloat(page)+1 >parseFloat(pageCount))
			   {
			       $("#next").hide();
			   }
		   if(parseFloat(page)-1 <1)
			   {
			     $("#first").hide();
			   }else{
				   $("#first").show();
			   };
			   
			  
	   });
	</script>
			</c:if>
		</div>
      </div>
      </c:if>
      <c:if test="${empty allnews }">
         <h3 style="color:red">暂没文件被上传，请上传。</h3>
      </c:if>
    </div>

